﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;
using System.Data;
namespace BLL
{

    public class huiyuanBLL
    {
        huiyuanDAL hyd = new huiyuanDAL();
        //--姓名
        //--邮箱
        //--性别
        //--加入时间
        //--开卡数量
        //--开通天数
        //--会员积分
        public bool hyadd(string name, string mail, string sex, string leave, int carnum, int cartime, int carintegral,int random) //会员添加
        {
            int a = hyd.hyadd(name, mail, sex, leave, carnum, cartime, carintegral, random);
            if (a > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }


        public DataTable hydgvshow()  //显示dgv数据
        {
            return hyd.hydgvshow();
        }
        public DataTable hydgvshow1()  //显示dgv1数据
        {
            
            return hyd.hydgvshow1();
        }
        public DataTable view() //显示主视图用户
        { 
            return hyd.view();
        }
        public DataTable viewcarnum()  //显示主视图销售卡量
        {
            return hyd.viewcarnum();
        }


        public DataTable MmodifyShow(int id)    //用户的修改赋值去主页面
        {
            
            return hyd.MmodifyShow(id);
        }

        public bool mModifyupdata(string name, string mail, string sex, string leave, int carnum, int cartime, int id) //用户的修改
        {
            
            int a= hyd.mModifyupdata(name, mail, sex, leave, carnum, cartime, id);
            if (a>0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        public bool mModifyDel(int id)    // 删除用户
        {
            
            int a= hyd.mModifyDel(id);
            if (a>0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        public DataTable mReach1(string name,int jyallmember,int leave)
        {
            return hyd.mReach1(name, jyallmember, leave);
        }

        public DataTable yhrandom(int name, int pwd) //随机码
        {         
            return hyd.yhrandom(name,pwd);
        }

        public DataTable yzrandom(int random)   //验证随机码正确错误
        {
            
            return hyd.yzrandom(random);
        }
    }
}
